﻿import Main from '@/view/main'
import parentView from '@/components/parent-view'
/**
 * iview-admin中meta除了原生参数外可配置的参数:
 * meta: {
 *  hideInMenu: (false) 设为true后在左侧菜单不会显示该页面选项
 *  notCache: (false) 设为true后页面不会缓存
 *  access: (null) 可访问该页面的权限数组，当前路由设置的权限会影响子路由
 *  icon: (-) 该页面在左侧菜单、面包屑和标签导航处显示的图标，如果是自定义图标，需要在图标名称前加下划线'_'
 * }
 */

export default [
  {
    path: '/login',
    name: 'login',
    meta: {
      title: 'Login - 登录',
      hideInMenu: true
    },
    component: resolve => { require(['@/view/login/login.vue'], resolve); }
  },
  {
    path: '/',
    name: 'home',
    redirect: '/home',
    component: Main,
    meta: {
      hideInMenu: true,
      notCache: true
    },
    children: [
      {
        path: '/home',
        name: 'home',
        meta: {
          hideInMenu: true,
          title: '首页',
          notCache: true
        },
        component: resolve => { require(['@/view/single-page/home'], resolve); }
      }
    ]
  },
  // {
  //   path: '/join',
  //   name: 'join',
  //   component: Main,
  //   children: [
  //     {
  //       path: 'join_page',
  //       name: 'join_page',
  //       meta: {
  //         icon: '_qq',
  //         title: 'QQ群'
  //       },
  //       component: resolve => { require(['@/view/join-page.vue'], resolve); }
  //     }
  //   ]
  // },

  {
    path: '/components',
    name: 'components',
    meta: {
      icon: 'logo-buffer',
      title: '基本信息'
    },
    component: Main,
      children: [
          {
              path: '/information',
              name: 'information',
              meta: {
                  icon: 'md-contact',
                  title: '添加信息'
              },
              component: resolve => { require(['@/view/information/information.vue'], resolve); }
          },
        {
        path: 'tables_page',
        name: 'tables_page',
        meta: {
          icon: 'md-grid',
          title: '多功能表格'
        },
        component: resolve => { require(['@/view/components/tables/tables.vue'], resolve); }
      },
    ]
  },
  // {
  //   path: '/update',
  //   name: 'update',
  //   meta: {
  //     icon: 'md-cloud-upload',
  //     title: '数据上传'
  //   },
  //   component: Main,
  //   children: [
  //     {
  //       path: 'update_table_page',
  //       name: 'update_table_page',
  //       meta: {
  //         icon: 'ios-document',
  //         title: '上传Csv'
  //       },
  //       component: resolve => { require(['@/view/update/update-table.vue'], resolve); }
  //     },
  //     {
  //       path: 'update_paste_page',
  //       name: 'update_paste_page',
  //       meta: {
  //         icon: 'md-clipboard',
  //         title: '粘贴表格数据'
  //       },
  //       component: resolve => { require(['@/view/update/update-paste.vue'], resolve); }
  //     }
  //   ]
  // },

  {
    path: '/401',
    name: 'error_401',
    meta: {
      hideInMenu: true
    },
    component: resolve => { require(['@/view/error-page/401.vue'], resolve); }
  },
  // {
  //   path: '/500',
  //   name: 'error500',_
  //   meta: {
  //     hideIn，enu: true
  //   },
  //   component: resolve => { require(['@/view/error-page/500.vue'], resolve); }
  // },
  {
    path: '*',
    name: 'error_404',
    meta: {
      hideInMenu: true
    },
    component: resolve => { require(['@/view/error-page/404.vue'], resolve); }
  }
]
